<?php
/**
 * Created by PhpStorm.
 * User: bililovy
 * Date: 19-3-20
 * Time: 下午1:45
 * Description:
 */

namespace ServiceSdk\Services;


/**
 * Class BaseService
 * @package Services
 */
class BaseService
{
    const SUCCESS_CODE = 0;
    protected $errorMsg = '';
    protected $errorCode = 0;

    public function __construct()
    {

    }

    /**
     * Description: 获取错误信息
     *
     *
     * @Author: Bililovy
     * @Date  : 19-6-11 下午12:37
     */
    public function getErrorMessage()
    {
        return $this->errorMsg;
    }

    /**
     * Description: 获取错误码
     *
     *
     * @Author: Bililovy
     * @Date  : 19-6-11 下午12:37
     */
    public function getErrorCode()
    {
        return $this->errorCode;
    }

    /**
     * Description: 搜集错误信息
     *
     * @param $err
     *
     * @Author: Bililovy
     * @Date  : 19-6-10 下午9:48
     */
    protected function setErrorMessage($err)
    {
        $this->errorMsg = $err;
    }

    /**
     * Description: 搜集错误码
     *
     * @param $code
     *
     * @Author: Bililovy
     * @Date  : 19-6-10 下午9:48
     */
    protected function setErrorCode($code)
    {
        $this->errorCode = $code;
    }
}